using System;
using System.Collections.Generic;
using System.Text;

namespace Zsa.Reflection.Discovery
{
    /// <summary>
    /// Used to declaratively declare an instance 
    /// </summary>
    [AttributeUsage( AttributeTargets.Class,AllowMultiple=true)]
    public class DeclaredInstanceAttribute : ActivationInstanceBaseAttribute
    {
        #region Constructor
        /// <summary>
        /// Initializes a new instance of the <see cref="DeclarativeInstanceAttribute"/> class.
        /// </summary>
        /// <param name="instanceName">Name of the instance.</param>
        /// <param name="instanceType">Type of the instance.</param>
        public DeclaredInstanceAttribute(string instanceName,
            string instanceTypeName, bool allowConfig)
            : this(instanceName, Type.GetType(instanceTypeName), allowConfig) 
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DeclaredInstanceAttribute"/> class.
        /// </summary>
        /// <param name="instanceName">Name of the instance.</param>
        /// <param name="typeName">Name of the type.</param>
        public DeclaredInstanceAttribute(string instanceName,
            Type instanceType, bool allowConfig)
            : base ( instanceName, instanceType, ActivationAttributeType.InstanceDeclaration,allowConfig )
        {
        }
        #endregion Constructor



    }
}
